package server;

import server.proxy.ClientHandler;
import server.proxy.ClientHandlerInterface;
import server.transport.SocketAcceptor;

import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        try {
            ClientHandler clientHandler = new ClientHandler("C:/work/messages", 3, "C:/work/pass.txt", "C:/work/private.txt");
            clientHandler.messageSenderStart();
            SocketAcceptor socketAcceptor = new SocketAcceptor(7777, clientHandler);
            socketAcceptor.start();
        } catch (IOException e) {
            e.printStackTrace();
            System.err.println("Server not started");
            System.exit(-1);
        }
    }
}
